<!DOCTYPE html>
<html lang="en">
<head>
    <header th:replace="layout/admin/head :: head"></header>
</head>
<body>
<div>
    <form id="article_add_form" method="get" action="">
        <div class="container-fluid">
            <div class="row">
                <div class="col-md-12">
                    标题： <input type="text" id="title" name="title" class="form-control"/>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    内容： <textarea id="content" name="content" class="form-control"></textarea>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12"></div>
            </div>
            <div class="row">
                <div class="col-md-12"></div>
            </div>
            <div class="row">
                <div class="col-md-6">
                    <!--<button id="btnSubmit" class="btn btn-primary" type="submit" onclick="formSubmit()">保存</button>-->
                    <input class="submit" type="submit" value="提交"/>
                    <button id="btnCancel" class="btn" type="button" onclick="cancelForm()">取消</button>
                </div>
            </div>
        </div>
    </form>
</div>

<script type="text/javascript">
    $().ready(function () {
        $("#article_add_form").validate({
            rules: {
                title:{
                    required: true
                },
                content: {
                    required: true
                }
            },
            messages: {
                title: {
                    required: "必填"
                },
                content: {
                    required: "必填"
                }
            }
        });
    });
</script>
</body>
</html>